package coreJava;

public class Customer {
	String firstName;
	String lastName;
	String phoneNumber;
	int itemId;
	int numOfItem;
	double price;
	boolean isEligible;
	

	public void customerInformation()
	{
		System.out.println("Customer frist name is " + firstName);
		System.out.println("Customer last name is " + lastName);
		System.out.println("Customer phone number is " + phoneNumber);
	}
	
	int numOfItem(int number)
	{
		return numOfItem = number;
	}
	public int itemID(int id)
	{   
		
		switch(id)
		{
		case 1: itemId = 1;
		break;
		case 2: itemId = 2;
		break;
		case 3: itemId = 3;
		break;
		default:
			System.out.println("Invalid Item");
		}
		
		return itemId;
	}
	
	public double calculateTotal()
	{
	     if(itemId==1)
			price = 10.00;
	     else if(itemId ==2)
	    	 price = 15.00;
	     else if(itemId==3)
	    	 price = 20.00;
	     else
	    	 price = 0.0;
	     
		double totalPrice = numOfItem * price ;
		return totalPrice;
	}
}
